<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>组件基础</title>
</head>

<body>
    <div id="app">
        <button-counter></button-counter>
        <button-counter></button-counter>
        <button-counter></button-counter>
    </div>

    <script type="module">
        import Vue from '../vue.esm.browser.js'

        Vue.component('button-counter', {
            data: function () {
                return {
                    count: 0
                }
            },
            template: '<button v-on:click="count++">You clicked me {{ count }} times.</button>'
        })

        const app = new Vue({
            el: '#app',
            data: {
                
            },
        })
    </script>
</body>

</html>